﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Categories.aspx.cs" Inherits="Categories" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <style type="text/css">
        .style1
        {
            height: 94px;
        }
    </style>
</head>
<body>
    <h1 style="color: Maroon; font-size: 22px;">Categories</h1>
    <form id="form1" runat="server">
    <div>
       
        <table>
            <tr>
                <td>
                    <table>
                        <tr>
                            <td>
                                Category ID:
                            </td>
                            <td>
                                <asp:TextBox ID="txtID" runat="server" Enabled="false"></asp:TextBox>
                            </td>
                        </tr>
                        
                        <tr>
                            <td>
                                Category Name:
                            </td>
                            <td>
                                <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td><asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
        ControlToValidate="txtName" Display="Dynamic" 
        ErrorMessage="Please enter Category Name" ValidationGroup="validate"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        
                        <tr>
                            <td class="style1">
                                Description:
                            </td>
                            <td class="style1">
                                <asp:TextBox ID="txtDescription" runat="server" Height="77px" TextMode="MultiLine"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td><asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
        ControlToValidate="txtDescription" Display="Dynamic" 
        ErrorMessage="Please enter description" ValidationGroup="validate"></asp:RequiredFieldValidator>
   
                            </td>
                        </tr>
                        
                        <tr>
                            <td>
                                <asp:Button ID="btnNew" runat="server" Text="New" Width="53px" 
                                    onclick="btnNew_Click"  />
                                <asp:Button ID="btnAdd" runat="server" Text="Add" Width="52px" 
                                    onclick="btnAdd_Click" ValidationGroup="validate" />
                            </td>
                            <td>
                                <asp:Button ID="btnUpdate" runat="server" Text="Update" 
                                    onclick="btnUpdate_Click" ValidationGroup="validate" />
                                <asp:Button ID="btnDelete" runat="server" Text="Delete" 
                                    onclick="btnDelete_Click" />
                            </td>
                        </tr>
                        
                    </table>
                </td>
                
                <td>
                    <table>
                        <tr>
                           
                            <td style="float:right">Search:
                                <asp:TextBox ID="txtSearch" runat="server"></asp:TextBox>
                                <asp:Button ID="btnSearch" runat="server" Text="Search" 
                                    onclick="btnSearch_Click" />
                            </td>
                        </tr>
                        <tr>
                            <td >
                                <table>
                                    <asp:GridView ID="gvCategory" runat="server" 
                                        onpageindexchanging="gvCategory_PageIndexChanging" 
                                        onselectedindexchanged="gvCategory_SelectedIndexChanged"></asp:GridView>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    
    
    </div>
    
    </form>
</body>
</html>
